# ---
# title: 939. Minimum Area Rectangle
# id: problem939
# author: Tian Jun
# date: 2020-10-31
# difficulty: Medium
# categories: Hash Table
# link: <https://leetcode.com/problems/minimum-area-rectangle/description/>
# hidden: true
# ---
# 
# Given a set of points in the xy-plane, determine the minimum area of a
# rectangle formed from these points, with sides parallel to the x and y axes.
# 
# If there isn't any rectangle, return 0.
# 
# 
# 
# **Example 1:**
# 
#     
#     
#     Input: [[1,1],[1,3],[3,1],[3,3],[2,2]]
#     Output: 4
#     
# 
# **Example 2:**
# 
#     
#     
#     Input: [[1,1],[1,3],[3,1],[3,3],[4,1],[4,3]]
#     Output: 2
#     
# 
# 
# 
# **Note** :
# 
#   1. `1 <= points.length <= 500`
#   2. `0 <= points[i][0] <= 40000`
#   3. `0 <= points[i][1] <= 40000`
#   4. All points are distinct.
# 
# 
## @lc code=start
using LeetCode

## add your code here:
## @lc code=end
